﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common;
using MainWindow.Model;
namespace MainWindow.DAL
{
    class LoginDAL
    {
        public bool CheckUserExist(User user)
        {
            IList<User> users = IBatisFun.QueryForList<User>("CheckUserIsExit", user);
            if(users.Count>0)
            {
                LogHelper.LogInfo("用户:" + user.username + "成功登录系统");

                return true;
            }
            LogHelper.LogError("用户:" + user.username + "登录系统失败",new Exception("dsafdsa"));
            Console.WriteLine("登录失败了");
            return false;
        }
    }
}
